package main

import (
	"github.com/labstack/echo"
	"github.com/labstack/echo/middleware"
	"tacitus/library"
	resp "tacitus/library/response"
	"tacitus/modules/guestbook"
)

func main() {
	e := echo.New()
	e.Use(middleware.CORS())
	e.Use(resp.ErrorHandler)

	guestbook.RouteApi(e.Group("/guestbook"))
	guestbook.RouteAdminApi(e.Group("/admin/guestbook"))

	e.Logger.Fatal(e.Start(":"+lib.Config.Port["dev"]))
}